package com.keguoyu.easymvp.ioc.internal

import com.google.gson.annotations.SerializedName

data class Invocation(
        @SerializedName("target") val target: InvokeMethod,
        @SerializedName("invoker") val invoker: InvokeMethod,
        @SerializedName("isStatic") val isStatic: Boolean,
        @SerializedName("params") val params: List<String>
) {
  companion object {
    fun invocationComparator(): Comparator<Invocation> {
      return Comparator { a, b ->
        a.target.className.compareTo(b.target.className)
      }
    }
  }
}

data class InvokeMethod(
    @SerializedName("class") val className: String,
    @SerializedName("method") val methodName: String
)